package com.news.controller;


import com.news.model.Record;
import com.news.service.RecordService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;
import org.springframework.ui.Model;
import org.springframework.web.bind.annotation.RequestMapping;

import java.util.List;

@Controller
@RequestMapping("/record")
public class RecordController {
    @Autowired
    private RecordService recordService;

    @RequestMapping("/query/{pageNum}/{pageSize}")
    public String queryAll(Model model){
        List<Record> records = recordService.queryAll();
        model.addAttribute("records",records);
        return"";
    }
}
